package cn.luoshaocheng.pet.controller;


import cn.luoshaocheng.pet.domain.PetType;
import cn.luoshaocheng.pet.service.IPetTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController //controller层  返回的是json格式数据
@RequestMapping("/petType")
public class PetTypeController {

    @Autowired
    private IPetTypeService iPetTypeService;

    @GetMapping("/typeTree")
    public List<PetType> petTree(){
        return iPetTypeService.petTree();
    }
}

